/**
 *
 * User: rendong
 * Date: 12-9-4
 * Time: 下午10:59
 * $Id: Main.js 12 2012-09-10 16:47:05Z rendong237@gmail.com $
 */

function Main(canvas)
{
    var stage = new GStage(canvas, "#00FF00", 30);

    var bm = new GBitmap();
    bm.setUrl("image/bg.jpg");

    stage.addChild(bm);

    bm = new GBitmap();
    bm.setUrl("image/card/370_570/img_maxCard_3.jpg");
    stage.addChild(bm);
    this.bm = bm;
/**
    for(var j=0; j < 50; j++){
    var sp = new GImageSprite(140, 200);
    for(var i=1; i< 28; i++){
        sp.addUrl("image/effect/"+i+".png");
    }
    sp.x = 900 * Math.random();
    sp.y = 600 * Math.random();
    stage.addChild(sp);
    }
 **/

    stage.addEventListener(GEvent.ENTER_FRAME, this.handler, this);

}

Main.prototype.handler = function(e)
{
    this.bm.x = Math.random() * 200;
    this.bm.y = Math.random() * 200;
}


